<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>过滤器</title>
    <script src="./js/vue.js"></script>
</head>
<body>
 <div id="app">
     <td>{{price|priceFilter}}</td>
 </div>
</body>
<script>
    let vm = new Vue({
        el: "#app",
        data:{
            price: 60
        },
        filters:{
            priceFilter(price){
                return '￥'+price.toFixed(2)
            }
        }
    })
</script>
</html>